package com.game.load
{
	import com.game.core.res.GameResource;
	import com.game.gamePort.ILoadNode;
	import com.game.ui.progress.SceProgressBarManager;
	
	public class LoadUiResource implements ILoadNode
	{
		private var _completeNotify : Function;
		
		public function LoadUiResource()
		{
		}
		
		public function startLoad():void
		{
			SceProgressBarManager.getInstance().setLoadId("ui2").setLoaderInfo("加载Ui资源").load(onComplete);
		}
		
		public function setCompleteNotify(fun:Function):void
		{
			_completeNotify = fun;
		}
		
		public function getState():String
		{
			return LoadState.LOAD_STATE_MAIN_UI;
		}
		
		private function onComplete(res:GameResource):void
		{
			if(_completeNotify != null)
				_completeNotify();
		}
		
	}
}